by
Shawn M. Gordon
President SMGA
Introduction
Programmers are always looking for better and easier ways to develop and maintain code, hence the rise and popularity of 4GL’s. The fact is there is still a massive amount of legacy COBOL code out there, more and more companies are turning to consultants to help them fill the gap and getting programming done. The problem for anybody dealing with someone else’s code, is dealing with someone else’s code. Nobody ever seems to think quite the same when it comes to programming. So what does this litany have to do with the product VistaMap? Well VistaMap does something that I have never seen any other COBOL tool do, and that is to give you bi-directional cross-referencing of variables within the program. I tested VistaMap on my HP 3000 series 37 with 2 meg of memory, and only me on the system.
There are actually two products here, VistMap and VistaRef, they are available separately, but if you get them together it’s pretty cheap. This software has been available for quit a number of years, and I was really suprised that I hadn’t heard of it before. It is important to note that this software will read and process reguler EDITOR type files as well as QEDIT (Robelle) type edit files. I am going to go ahead and cover both products in this review. Now on to the details.
Features
The first thing to do is to run VISTAMAP, looking at the sample job stream will tell you what the available options are.
!JOB VISTAMAP, user.account,group ;OUTCLASS=LP,1
!
!COMMENT SAMPLE VISTAMAP/3000 JOBSTACK
!
!COMMENT PARM OPTION ON RUN COMMAND WORKS AS FOLLOWS
!COMMENT PARM=10 GIVES SORTED REFERENCES AT END
!COMMENT PARM=01 TURNS OFF BLOCK LETTER BANNER
!COMMENT PARM=02 TWO PAGE BANNER PRINTED
!COMMENT PARM=00 STANDARD DEFAULT, NO SORTED REFERENCES
!COMMENT BLOCK LETTER BANNER PAGE PRINTED
!
!FILE COPYLIB=COPYLIB.group.account
!FILE PRINTER;DEV=LP;CCTL
!
!RUN VISTAMAP.PUB.SYS;PARM=00
progname.group.account FILE NAME OF PROGRAM TO BE CROSS-REFERENCED;
progname.group.account MORE THAN ONE PROGRAM AT A TIME IS ALLOWED
progname.group.account WILD CARD NAMES NOT PERMITTED
END.
!
!COMMENT ‘END.’ or ‘END” or “E” or “.” DELIMITS END OF PARAMETERS
!
!EOJ
It’s just as easy to run interactively as in batch. I was able to process a thousand plus line program in about a minute on my system. I imagine on a Spectrum box it would process in just a few seconds. If you would take a look at figure 1 you will see a fairly detailed description of the layout that VistMap supplies. As you can see, each variable declaration is potentially followed by a list numbers. These numbers will indicate what line numbers the variable is on in your code. An asterisk ‘*’ indicates that the code changes value at that line number.
One of the options for running the program is to display a sorted cross reference at the end of the code. This is a little bit like the list you get with CROSSREF as a $CONTROL compiler option. You will see paragraph names first with all the line numbers that they are referenced by, an asterisk ‘*’ indicates that you get their by use of a GO TO statement. You will then get a list of all the variables in sorted order. These will follow the same rules as those displayed in working storage.
An interesting point to note is that VistaMap doesn’t require that you compile the listing for it’s information. They resolve all COPYLIB and $INCLUDE statements themselves, all you have to do is point it at your source code.
That’s all there really is to setting up, running, and looking at a VistaMap cross-reference listing. Pretty simple huh?
Now I am going to go over the VistaRef product. VistaRef is a data-name cross reference tool. Based on a list of prefixes and a list of source program files to search, this tool will list all data-names beginning with one of the prefixes, the source program name it was found in, and whether the value is update or just referenced in the program. When run against an entire system, the result is a report cataloging all the standard data-names (for example database fields) for the system, and fully documents their existence/use in the system. This would obviously be handy for when you have to make those data base structural changes.
Here is the sample job stream for VistaRef;
!JOB VISTAREF, user.account,group ;OUTCLASS=LP,1
!
!
!COMMENT Sample VISTAREF/3000 Jobstack – Version 2.8
!COMMENT
!COMMENT The format of the prfxfile is 80 characters per record,
!COMMENT 16 records per block (editor format)
!
!FILE COPYLIB=COPYLIB.group.account
!FILE LIST=VISTAREF;DEV=LP,,1;CCTL
!FILE PRFXFILE=PRFXFILE.group.account (DATA NAME PREFIXES)
!FILE SRTXREF;DISC=50000,32,1
!
!RUN VISTAREF.PUB.SYS
progname.group.account FILE NAME OF PROGRAM TO BE CROSS-REFERENCED;
progname.group.account MORE THAN ONE PROGRAM AT A TIME IS ALLOWED
prog@.group.account
prog#.group.account :LISTF wildcards (@, #, ?) are valid.
prog?.group.account
END. ‘END.’ MARKS END OF PROGRAM PARAMETERS
!EOJ
So your first step is to create a PRFXFILE that contains all the data name prefixes that you want to search for. I just went through my COPYLIB to see what I was using, and typed up the 20 or so prefixes that I had for my different data bases. Then I set up the file equations and ran the program interactively against my entire development account. I was amazed at how quickly it scanned through my code, it processed about 20,000 lines of code in around 15 minutes. Here is a sample of the output file that it generated for me.
VISTAREF DATANAME CROSS-REFERENCE PREFIX: AD ****************************************************************************** AD-ALIAS-NAME *NOTIFY FYIMAIL *FYIMAIL2 *FYIPIM2 SHELL AD-ALIAS-NAME# NOTIFY FYIPIM2 AD-DAYS-NUM *FYIMAIL8 *FYIBBS3 AD-MAIL-NAME *FYIMAIL *FYIMAIL2 FYIMAIL3 *FYISHELL *SHELL AD-MAIL-NAME# FYIMAIL2 *SHELL ADVANCING# BBSCMPSE DWPL HELP FYIMAIL FYIMAIL PIMTODO SHFILTER SHFOLDER VISTAREF DATANAME CROSS-REFERENCE PREFIX: BD ******************************************************************************* BD-DATE-STAMP *BOOKMARK BD-DESCR *BOOKMARK BD-MAIL-FILE *BOOKMARK BD-MAIL-NAME *BOOKMARK BD-PRIV FYIAPI FYIGRUNT FYISTAMP BD-PUB FYIAPI FYIGRUNT FYISTAMP BD-TIME-STAMP BOOKMARK BD-USER FYIAPI FYIGRUNT FYISTAMP
I have only displayed the results of prefix AD and BD. What you see on the left is the variable name that was found that starts with that prefix. As you can see by the fact that the word ADVANCING made it in, it is not perfectly ignoring COBOL reserved words. On the right side of the list is the source code that the variable is found in. If the program updates the data-name directly it will be indicated with an asterisk ‘*’ before the program name. Programs that just initialize the data-name by moving zeroes or spaces to it are indicated with a pound sign ‘#’. No indicator means it is referenced somewhere in the Procedure Division, but nothing is done to it.
That’s all there is to it. A few minutes of your time, a few minutes of your computers time, and you have a comprehensive list of what get’s changed where.
Usability (also installation)
I had to get a special installation on PC diskette because of the fact that I have an old 9144 cartridge tape system, and few vendors seem to have these at their sites anymore. Even with this handicap I was able to easily install the software in about 5 minutes.
Using the software couldn’t be more straight forward as I indicated earlier. I recommend getting the full PARM=10 listing because of how much more information is contained in it. But that is probably the toughest part of the software, deciding what PARM to run with.
Reliability
This stuff is solid as a rock. I use a lot of combinations of INCLUDE files and COPYLIB’s, as well as just having a lot of code in general, and the software was always right on. I never had an instance of it aborting or causing any corruption, or even getting into a loop and hanging.
Performance
This product really is a speed demon, even on my series 37 it was able to process fairly large code in a very reasonable amount of time. I was really amazed at how fast VISTAREF was able to read through all my source code and generate a report. It was very impressive.
Supportability (including Doc)
The documentation is almost non-existent for the products – You have a one pager for each product that describes the basics of what it does and what it means. You also have a couple of sample job streams that will show you how the products can be invoked to generate your cross reference. One things for sure, you won’t get overwhelmed by looking at the documentation.
Support from Vista is excellent, but there is really very little to ask them. That is probably why the support costs are so modest.
Summary
VistaMap is just a very handy product to have around. It is so quick and easy to get a listing, and the information is so straight forward and readily available that you just can’t go wrong. There are a couple of things that I would have liked to have seen in the software. First I would like to see a map generated of nested perform statements so you could easily trace the call hierarchy. From what I understand they are working on this option as I write this review, and it might even be available by the time you read this. The other thing I would have liked to have seen is for the COBOL Macros to be expanded within the source code. I don’t know how big a deal this will be for most people, but for completeness I would have liked to have seen it.
One cute little program they included (this is or was part of the Robelle QLIB) is a procedure called ‘NEATER’. This can be invoked from EDITOR or QEDIT and what it will do is align your code for you. So you can type as messy as you want and then use this procedure to align all your PIC, VALUE, TO, etc. type statements. I thought this was a neat little program. I don’t know if they include it normally, but you should ask for it.
Bottom line, this is pushing into the arena of the ‘must have’ utility, especially for consultants. The modest cost just makes it that much more attractive.
At-a-Glance box
Vista Data Systems
16600 Sprague Rd., Suite 225
Cleveland, Ohio 44130-6318
Phone 216-234-8881
FAX 216-234-8451
Call, write or FAX to get information, a demo, or to buy the product.
VistaMap $750.00 with yearly maintenance being $75.00. VistaRef is the same price unless it is purchased at the same time as VistaMap in which case it is half price $375.00.